<style>
.btnchoiced {
	padding: 2pt 2pt 2pt 2pt;
	border: 1px solid Lime;
	background-color: Green;
	color: white;
}

div#divRatePanel{
  float:right;
  height:160px;
  top:150px;
  left:100px;
}

</style>
<script src="js_3d/showRateRecord.js"></script>
<div id="divRateRecord"></div>
<div id="divRatePanel"></div>
{menuList}
<br>
<table width="69%" border=0 cellpadding=0 cellspacing=0>
<tr><td width="62%">
<span id="hktime"></span>，<span id="countdownstr"></span>
</td><td width="22%">
</td></tr>
</table>


<table cellSpacing="1" cellPadding="3" width="700" border="0" bgcolor="#6A99A6">
<tr bgcolor="#C0D6EB">
  <td width="16%" align="center">二尾</td>
  <td width="16%" align="center">三尾</td>
  <td width="16%" align="center">四尾</td>
  <td width="16%" align="center">五尾</td>
</tr>
<tr>
  <td align="center" bgcolor="#e7ebef" height="28">
  <input type=button onclick="javascript:showRateDefPage(36,21,'二尾');" value=操盘 class=btnchoiced><br></td>
  <td align="center" bgcolor="#e7ebef" height="28">
  <input type=button onclick="javascript:showRateDefPage(36,31,'三尾');" value=操盘 class=btnchoiced><br></td>
  <td align="center" bgcolor="#e7ebef" height="28">
  <input type=button onclick="javascript:showRateDefPage(36,41,'四尾');" value=操盘 class=btnchoiced><br></td>
  <td align="center" bgcolor="#e7ebef" height="28">
  <input type=button onclick="javascript:showRateDefPage(36,51,'五尾');" value=操盘 class=btnchoiced><br></td>
</tr>
<tr>
  <td align="center" bgcolor="#FCFCD8"><a href="op.php?op=agent&fp=betlist1&dt1={dt}&dt2={dt}&bettype=36&page=-1&order=2&numbers=21">{money21}</a></td>
  <td align="center" bgcolor="#FCFCD8"><a href="op.php?op=agent&fp=betlist1&dt1={dt}&dt2={dt}&bettype=36&page=-1&order=2&numbers=31">{money31}</a></td>
  <td align="center" bgcolor="#FCFCD8"><a href="op.php?op=agent&fp=betlist1&dt1={dt}&dt2={dt}&bettype=36&page=-1&order=2&numbers=41">{money41}</a></td>
  <td align="center" bgcolor="#FCFCD8"><a href="op.php?op=agent&fp=betlist1&dt1={dt}&dt2={dt}&bettype=36&page=-1&order=2&numbers=51">{money51}</a></td>
</tr>
<tr valign="top" align="center">
  <td bgcolor="#FFFFFF">
    <table border="0" width="92%" cellspacing="0" cellpadding="0">{list21}</table>
  </td>
  <td bgcolor="#FFFFFF">
    <table border="0" width="92%" cellspacing="0" cellpadding="0">{list31}</table>
  </td>
  <td bgcolor="#FFFFFF">
    <table border="0" width="92%" cellspacing="0" cellpadding="0">{list41}</table>
  </td>
  <td bgcolor="#FFFFFF">
    <table border="0" width="92%" cellspacing="0" cellpadding="0">{list51}</table>
  </td>
</tr>
</table>

<p>
<input type=button value="重新整理" onclick='location.reload()'>
</p>


<script>
var _id = {lotto_id};
if (window.XMLHttpRequest)
{// code for all new browsers
    var XH1 = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
  var XH1 = new ActiveXObject("Microsoft.XMLHTTP");
} else 
  alert("Your browser does not support XMLHTTP.");
var now = new Date(1000 * {phptime});
nowdate();
function nowdate()
{
    document.all.hktime.innerHTML = "香港时间：<b>"+now.getDate()+"日"+d2(now.getHours())+":"+d2(now.getMinutes())+":"+d2(now.getSeconds()+"</b>");
    now.setTime(now.getTime() + 1000);
    setTimeout("nowdate()",1000);
}

var timestap = {timestap};
function countdown()
{
    if (timestap >= 0) {
      timediff = timestap;
      days = Math.floor(timediff / (60 * 60 * 24)); 
    	timediff -= days * (60 * 60 * 24);
    	hours = Math.floor(timediff / (60 * 60));
    	timediff -= hours * (60 * 60);	
    	mins = Math.floor(timediff / (60));
    	timediff -= mins * (60);	
    	secs = Math.floor(timediff);
        
        str = "距离截止下注时间还有 ";
        if (days > 0 ) str += "<b>" + days + "</b> 天 ";
        if (hours > 0) str += "<b>" + hours + "</b> 小时 ";
        if (mins > 0) str += "<b>" + mins + "</b> 分钟 ";
        str += "<b>" + secs + "</b> 秒 ";
        countdownstr.innerHTML =  str;
        setTimeout("countdown()",1000)
        timestap-=1;
        if (timestap==0) {
            location.reload();
        }
    } else {
        countdownstr.innerHTML =  "<font color=red><b>已经截止下注！</b></font>";
    }
}
countdown();

function ratediff(btype, num, rate)
{
    XH1.open("POST", "op.php?op=admin&fp=ratediff&id="+_id+"&bettype="+btype+"&number="+num+"&rate="+rate+"&pagename=0&method=0",false); 
    try{XH1.send("");}catch(E){}
	  setTimeout("location.href='op.php?op=admin&fp=now7'",10);
}

//显示尾数赔率设定表
function showRateDefPage(btype, subid , caption)
{
  var oObj = document.getElementById("divRatePanel");
  var sUrl = "op.php?op=admin&fp=ratePanel&lotto_id="+_id+"&bettype=" + btype + "&subid=" + subid; 
  oObj.innerHTML = "<div class='td0' align=right><span style='float:left;'>["+caption+"]的操盘赔率设定</span><input type='button' value='&nbsp;X&nbsp;' onclick='javascript:divRatePanel_close();' class='c4'></div><iframe src='" + sUrl + "' width='400' height='100%'></iframe><br />"; 
  oObj.className = "showRateRecord";
}

//关闭赔率设定表
function divRatePanel_close(){
  var oObj = document.getElementById("divRatePanel");
  oObj.innerHTML = "";
  oObj.className= "noneRateRecord";
}

</script>